<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>
<head>
    <title>我的申请</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/weui/lib/weui.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/weui/css/jquery-weui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/weui/css/main.css">

</head>

<body ontouchstart>
<header class='demos-header'>
    <h1 class="demos-title" style="text-align: center">申报记录</h1>
</header>
<c:forEach items="${list}" var="record">
    <div class="weui-form-preview">
        <div class="weui-form-preview__hd">
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">审批状态</label>
                <c:if test="${record.reportResult=='1'}">
                    <em class="weui-form-preview__value" style="color: green">审批通过</em>
                </c:if>
                <c:if test="${record.reportResult=='0'}">
                    <em class="weui-form-preview__value" style="color: blue">待审批</em>
                </c:if>
                <c:if test="${record.reportResult=='-1'}">
                    <em class="weui-form-preview__value" style="color: red">审批拒绝</em>
                </c:if>
            </div>
        </div>
        <div class="weui-form-preview__bd">
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">申请人</label>
                <span class="weui-form-preview__value">【${record.drinkRole}】${record.drinkPerson}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">申请时间</label>
                <span class="weui-form-preview__value">
                  <fmt:formatDate value="${record.drinkApplyTime}"
                                  pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">饮酒地点</label>
                <span class="weui-form-preview__value">${record.drinkPlace}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">饮酒时间</label>
                <span class="weui-form-preview__value">
            <fmt:formatDate value="${record.drinkStartTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
            到<fmt:formatDate value="${record.drinkEndTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
          </span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">申请理由</label>
                <span class="weui-form-preview__value">${record.drinkReason}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">紧急联系人</label>
                <span class="weui-form-preview__value">${record.emergencyPhone}</span>
            </div>
            <c:if test="${record.reportResult=='1'||record.reportResult=='-1'}">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">审批人</label>
                    <span class="weui-form-preview__value">${record.reportRole}${record.reportPersonName}</span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">审批时间</label>
                    <span class="weui-form-preview__value"><fmt:formatDate value="${record.reportTime}"
                                                                           pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span>
                </div>
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">审批意见</label>
                    <span class="weui-form-preview__value">${record.reportExplain}</span>
                </div>
            </c:if>
        </div>
        <div class="weui-form-preview__ft">
            <c:if test="${record.reportResult=='0'}">
                <button type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary"
                        href="javascript:back();">撤销
                </button>
            </c:if>
            <c:if test="${record.reportResult=='-1'}">
                <button type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary"
                        href="javascript:again();">再次申请
                </button>
            </c:if>
            <c:if test="${record.reportResult=='1'}">
                <button type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary" href="javascript:">
                    确定
                </button>
            </c:if>
        </div>
    </div>
    <br>
    <div class="weui-tabbar">
        <a href="${pageContext.request.contextPath}/index.do" class="weui-tabbar__item weui-bar__item">
            <div class="weui-tabbar__icon">
                <img src="${pageContext.request.contextPath}/static/weui/images/index.png" alt="">
            </div>
            <p class="weui-tabbar__label">返回首页</p>
        </a>
    </div>
</c:forEach>
<script src="${pageContext.request.contextPath}/static/weui/lib/jquery-2.1.4.js"></script>
<script src="${pageContext.request.contextPath}/static/weui/lib/fastclick.js"></script>
<script>
    $(function () {
        FastClick.attach(document.body);
    });
</script>
<script src="${pageContext.request.contextPath}/static/weui/js/jquery-weui.js"></script>

</body>
</html>
